package link.gpt.dao;

import link.gpt.pojo.Question;
import link.gpt.pojo.QuestionExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionDao {
   long countByExample(QuestionExample example);

   int deleteByExample(QuestionExample example);

   int deleteByPrimaryKey(Integer id);

   int insert(Question record);

   int insertSelective(Question record);

   List<Question> selectByExample(QuestionExample example);

   Question selectByPrimaryKey(Integer id);

   int updateByExampleSelective(@Param("record") Question record, @Param("example") QuestionExample example);

   int updateByExample(@Param("record") Question record, @Param("example") QuestionExample example);

   int updateByPrimaryKeySelective(Question record);

   int updateByPrimaryKey(Question record);


   /**
    * 更新问题回答次数
    * @param id
    * @return
    */
   int updateQuestionAnsCount(Integer id);
}